package com.bestcem.xm.deliver.controller.v2.vo;

import com.bestcem.xm.deliver.grpc.client.dto.AwardDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
public class DeliverVo {

    @JsonProperty("created_id")
    private String createdId;

    @JsonProperty("updated_id")
    private String updatedId;

    @JsonProperty("version_id")
    private Integer versionId;

    @JsonProperty("deleted")
    private Boolean deleted;

    @JsonProperty("created_dt")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createdDt;

    @JsonProperty("updated_dt")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updatedDt;

    private String id;

    @JsonProperty("orgID")
    private String orgId;

    private String code;

    private String name;

    private Integer ttype;

    private Integer status;

    private Integer channel;

    private Integer scenes;

    private Integer disable;

    private String reason;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime starttime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime finishtime;

    @JsonProperty("delay_time")
    //@JSONField(name = "delay_time")
    private String delayTime;

    @JsonProperty("delay_failed_ttype")
    //@JSONField(name = "delay_failed_ttype")
    private Integer delayFailedTtype;

    @JsonProperty("delay_failed_time")
    //@JSONField(name = "delay_failed_time")
    private String delayFailedTime;

    @JsonProperty("award_use_type")
    //@JSONField(name = "award_use_type")
    private Integer awardUseType;

    @JsonProperty("award_id")
    //@JSONField(name = "award_id")
    private String awardId;

    @JsonProperty("enable_respondent")
    //@JSONField(name = "enable_respondent")
    private Integer enableRespondent;

    @JsonProperty("deliver_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime deliverTime;

    private Long version;

    @JsonProperty("wx_card_share_title")
    private String wxCardShareTitle;

    @JsonProperty("wx_card_share_bg_img")
    private String wxCardShareBgImg;

    private String link;

    @JsonProperty("default_deliver_id")
    private String defaultDeliverId;

    private AwardDto award;

    private String url;
}
